def func():
    a = input()
    b = ''
    c = []
    for i in a:
        if 'a' <= i <= 'z' or "A" <= i <= "Z":
            b = b+i
        else:
            c.append(b)
            b = ''
    c.append(b)
    while c:
        print(c.pop(),end=" ")


if __name__ == "__main__":
    func()